<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set read file buffering on the given stream</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.stream-set-read-buffer" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_set_read_buffer</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.3, PHP 7)</p><p class="refpurpose"><span class="refname">stream_set_read_buffer</span> &mdash; <span class="dc-title">Set read file buffering on the given stream</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.stream-set-read-buffer-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stream_set_read_buffer</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$buffer</code></span>
   ) : <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Sets the read buffer. It&#039;s the equivalent of <span class="function"><a href="stream_set_write_buffer.html" class="function">stream_set_write_buffer()</a></span>,
   but for read operations.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stream-set-read-buffer-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<code class="parameter">stream</code></dt>

    <dd>

     <p class="para">
      The file pointer.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">buffer</code></dt>

    <dd>

     <p class="para">
      The number of bytes to buffer. If <code class="parameter">buffer</code>
      is 0 then read operations are unbuffered.  This ensures that all reads
      with <span class="function"><a href="fread.html" class="function">fread()</a></span> are completed before other processes are
      allowed to read from that input stream.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stream-set-read-buffer-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns 0 on success, or another value if the request
   cannot be honored.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.stream-set-read-buffer-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="stream_set_write_buffer.html" class="function" rel="rdfs-seeAlso">stream_set_write_buffer()</a> - Sets write file buffering on the given stream</span></li>
  </ul>
 </div>

</div></div></div></body></html>